3.15 \(\int \frac{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx\)

Optimal. Leaf size=103 \[ \frac{2 \sec (e+f x) \sqrt{a \sin (e+f x)+a} \sqrt{g \sin (e+f x)}}{c f}+\frac{2 \sqrt{a} \sqrt{g} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \cos (e+f x)}{\sqrt{a \sin (e+f x)+a} \sqrt{g \sin (e+f x)}}\right )}{c f} \]

[Out]

(2*Sqrt[a]*Sqrt[g]*ArcTan[(Sqrt[a]*Sqrt[g]*Cos[e + f*x])/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])])/(c*
f) + (2*Sec[e + f*x]*Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(c*f)

________________________________________________________________________________________

Rubi [A]  time = 0.468132, antiderivative size = 103, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 40, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {2928, 2775, 205, 2930, 12, 30} \[ \frac{2 \sec (e+f x) \sqrt{a \sin (e+f x)+a} \sqrt{g \sin (e+f x)}}{c f}+\frac{2 \sqrt{a} \sqrt{g} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \cos (e+f x)}{\sqrt{a \sin (e+f x)+a} \sqrt{g \sin (e+f x)}}\right )}{c f} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(c - c*Sin[e + f*x]),x]

[Out]

(2*Sqrt[a]*Sqrt[g]*ArcTan[(Sqrt[a]*Sqrt[g]*Cos[e + f*x])/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])])/(c*
f) + (2*Sec[e + f*x]*Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(c*f)

Rule 2928

Int[(Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]])/((c_) + (d_.)*sin[(e_.) +
 (f_.)*(x_)]), x_Symbol] :> Dist[g/d, Int[Sqrt[a + b*Sin[e + f*x]]/Sqrt[g*Sin[e + f*x]], x], x] - Dist[(c*g)/d
, Int[Sqrt[a + b*Sin[e + f*x]]/(Sqrt[g*Sin[e + f*x]]*(c + d*Sin[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f,
 g}, x] && NeQ[b*c - a*d, 0] && (EqQ[a^2 - b^2, 0] || EqQ[c^2 - d^2, 0])

Rule 2775

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
(-2*b)/f, Subst[Int[1/(b + d*x^2), x], x, (b*Cos[e + f*x])/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]])
], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2930

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]*((c_) + (d_.)*sin[(e_.) +
(f_.)*(x_)])), x_Symbol] :> Dist[(-2*b)/f, Subst[Int[1/(b*c + a*d + c*g*x^2), x], x, (b*Cos[e + f*x])/(Sqrt[g*
Sin[e + f*x]]*Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && EqQ[a^
2 - b^2, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx &=g \int \frac{\sqrt{a+a \sin (e+f x)}}{\sqrt{g \sin (e+f x)} (c-c \sin (e+f x))} \, dx-\frac{g \int \frac{\sqrt{a+a \sin (e+f x)}}{\sqrt{g \sin (e+f x)}} \, dx}{c}\\ &=-\frac{(2 a g) \operatorname{Subst}\left (\int \frac{1}{c g x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{f}+\frac{(2 a g) \operatorname{Subst}\left (\int \frac{1}{a+g x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{c f}\\ &=\frac{2 \sqrt{a} \sqrt{g} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \cos (e+f x)}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{c f}-\frac{(2 a) \operatorname{Subst}\left (\int \frac{1}{x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{c f}\\ &=\frac{2 \sqrt{a} \sqrt{g} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \cos (e+f x)}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{c f}+\frac{2 \sec (e+f x) \sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}{c f}\\ \end{align*}

Mathematica [C]  time = 0.945345, size = 194, normalized size = 1.88 \[ \frac{2 e^{i (e+f x)} \sqrt{a (\sin (e+f x)+1)} \sqrt{g \sin (e+f x)} \left (2 \left (-1+e^{2 i (e+f x)}\right )-i \left (e^{i (e+f x)}-i\right ) \sqrt{-1+e^{2 i (e+f x)}} \tan ^{-1}\left (\sqrt{-1+e^{2 i (e+f x)}}\right )-\left (e^{i (e+f x)}-i\right ) \sqrt{-1+e^{2 i (e+f x)}} \tanh ^{-1}\left (\frac{e^{i (e+f x)}}{\sqrt{-1+e^{2 i (e+f x)}}}\right )\right )}{c f \left (-1+e^{4 i (e+f x)}\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(c - c*Sin[e + f*x]),x]

[Out]

(2*E^(I*(e + f*x))*(2*(-1 + E^((2*I)*(e + f*x))) - I*(-I + E^(I*(e + f*x)))*Sqrt[-1 + E^((2*I)*(e + f*x))]*Arc
Tan[Sqrt[-1 + E^((2*I)*(e + f*x))]] - (-I + E^(I*(e + f*x)))*Sqrt[-1 + E^((2*I)*(e + f*x))]*ArcTanh[E^(I*(e +
f*x))/Sqrt[-1 + E^((2*I)*(e + f*x))]])*Sqrt[g*Sin[e + f*x]]*Sqrt[a*(1 + Sin[e + f*x])])/(c*(-1 + E^((4*I)*(e +
 f*x)))*f)

________________________________________________________________________________________

Maple [B]  time = 0.444, size = 914, normalized size = 8.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e)),x)

[Out]

1/4/c/f*2^(1/2)*(4*2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)-sin(f*x+e)*ln(-(2^(1/2)*(-(-1+cos(f*
x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)+sin(f*x+e)-cos(f*x+e)+1)/(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f
*x+e)-sin(f*x+e)+cos(f*x+e)-1))-4*sin(f*x+e)*arctan(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)+1)-4*sin(f*x+e
)*arctan(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)-1)-sin(f*x+e)*ln(-(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^
(1/2)*sin(f*x+e)-sin(f*x+e)+cos(f*x+e)-1)/(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)+sin(f*x+e)-c
os(f*x+e)+1))-cos(f*x+e)*ln(-(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)+sin(f*x+e)-cos(f*x+e)+1)/
(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)-sin(f*x+e)+cos(f*x+e)-1))-4*cos(f*x+e)*arctan(2^(1/2)*
(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)+1)-4*cos(f*x+e)*arctan(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)-1)-cos(
f*x+e)*ln(-(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)-sin(f*x+e)+cos(f*x+e)-1)/(2^(1/2)*(-(-1+cos
(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)+sin(f*x+e)-cos(f*x+e)+1))+ln(-(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/
2)*sin(f*x+e)+sin(f*x+e)-cos(f*x+e)+1)/(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)-sin(f*x+e)+cos(
f*x+e)-1))+4*arctan(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)+1)+4*arctan(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+
e))^(1/2)-1)+ln(-(2^(1/2)*(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)-sin(f*x+e)+cos(f*x+e)-1)/(2^(1/2)*(-(
-1+cos(f*x+e))/sin(f*x+e))^(1/2)*sin(f*x+e)+sin(f*x+e)-cos(f*x+e)+1)))*(g*sin(f*x+e))^(1/2)*(a*(1+sin(f*x+e)))
^(1/2)/sin(f*x+e)/cos(f*x+e)/(-(-1+cos(f*x+e))/sin(f*x+e))^(1/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{\sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )}}{c \sin \left (f x + e\right ) - c}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e)),x, algorithm="maxima")

[Out]

-integrate(sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))/(c*sin(f*x + e) - c), x)

________________________________________________________________________________________

Fricas [A]  time = 4.17023, size = 1211, normalized size = 11.76 \begin{align*} \left [\frac{\sqrt{-a g} \cos \left (f x + e\right ) \log \left (\frac{128 \, a g \cos \left (f x + e\right )^{5} - 128 \, a g \cos \left (f x + e\right )^{4} - 416 \, a g \cos \left (f x + e\right )^{3} + 128 \, a g \cos \left (f x + e\right )^{2} + 289 \, a g \cos \left (f x + e\right ) + 8 \,{\left (16 \, \cos \left (f x + e\right )^{4} - 24 \, \cos \left (f x + e\right )^{3} - 66 \, \cos \left (f x + e\right )^{2} +{\left (16 \, \cos \left (f x + e\right )^{3} + 40 \, \cos \left (f x + e\right )^{2} - 26 \, \cos \left (f x + e\right ) - 51\right )} \sin \left (f x + e\right ) + 25 \, \cos \left (f x + e\right ) + 51\right )} \sqrt{-a g} \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )} + a g +{\left (128 \, a g \cos \left (f x + e\right )^{4} + 256 \, a g \cos \left (f x + e\right )^{3} - 160 \, a g \cos \left (f x + e\right )^{2} - 288 \, a g \cos \left (f x + e\right ) + a g\right )} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1}\right ) + 8 \, \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )}}{4 \, c f \cos \left (f x + e\right )}, -\frac{\sqrt{a g} \arctan \left (\frac{\sqrt{a g}{\left (8 \, \cos \left (f x + e\right )^{2} + 8 \, \sin \left (f x + e\right ) - 9\right )} \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )}}{4 \,{\left (2 \, a g \cos \left (f x + e\right )^{3} + a g \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a g \cos \left (f x + e\right )\right )}}\right ) \cos \left (f x + e\right ) - 4 \, \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )}}{2 \, c f \cos \left (f x + e\right )}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e)),x, algorithm="fricas")

[Out]

[1/4*(sqrt(-a*g)*cos(f*x + e)*log((128*a*g*cos(f*x + e)^5 - 128*a*g*cos(f*x + e)^4 - 416*a*g*cos(f*x + e)^3 +
128*a*g*cos(f*x + e)^2 + 289*a*g*cos(f*x + e) + 8*(16*cos(f*x + e)^4 - 24*cos(f*x + e)^3 - 66*cos(f*x + e)^2 +
 (16*cos(f*x + e)^3 + 40*cos(f*x + e)^2 - 26*cos(f*x + e) - 51)*sin(f*x + e) + 25*cos(f*x + e) + 51)*sqrt(-a*g
)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e)) + a*g + (128*a*g*cos(f*x + e)^4 + 256*a*g*cos(f*x + e)^3 - 160
*a*g*cos(f*x + e)^2 - 288*a*g*cos(f*x + e) + a*g)*sin(f*x + e))/(cos(f*x + e) + sin(f*x + e) + 1)) + 8*sqrt(a*
sin(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(c*f*cos(f*x + e)), -1/2*(sqrt(a*g)*arctan(1/4*sqrt(a*g)*(8*cos(f*x +
e)^2 + 8*sin(f*x + e) - 9)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))/(2*a*g*cos(f*x + e)^3 + a*g*cos(f*x +
 e)*sin(f*x + e) - 2*a*g*cos(f*x + e)))*cos(f*x + e) - 4*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(c*f*c
os(f*x + e))]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{\int \frac{\sqrt{g \sin{\left (e + f x \right )}} \sqrt{a \sin{\left (e + f x \right )} + a}}{\sin{\left (e + f x \right )} - 1}\, dx}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sin(f*x+e))**(1/2)*(a+a*sin(f*x+e))**(1/2)/(c-c*sin(f*x+e)),x)

[Out]

-Integral(sqrt(g*sin(e + f*x))*sqrt(a*sin(e + f*x) + a)/(sin(e + f*x) - 1), x)/c

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{\sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )}}{c \sin \left (f x + e\right ) - c}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e)),x, algorithm="giac")

[Out]

integrate(-sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))/(c*sin(f*x + e) - c), x)